package com.showcai.module;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by Baggio on 2018-8-10.
 */
public class BaseModule implements Serializable {

    /**
     * -1：有效-未领用
     */
    public static final byte CERTIFICATE_STATUS_NOT_ACTIVATION = -1;
    /**
     * 0：无效-未领用
     */
    public static final byte STATUS_UNVALID = 0;
    /**
     * 1:有效-已激活
     */
    public static final byte STATUS_VALID = 1;

    /**
     * 2：使用中
     */
    public static final byte STATUS_USEING = 2;

    /**
     * 3：已使用
     */
    public static final byte STATUS_USERD = 3;

    /**
     * 3：待发货
     */
    public static final byte PENDING_DELIVERY = 12;
    private Long tid;
    private Byte status;
    private Long operatorId;

    private Date createTime;

    public Long getTid() {
        return tid;
    }

    public void setTid(Long tid) {
        this.tid = tid;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Date getCreateTime() {
        return createTime;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime == null ? new Date() : createTime;
    }
}
